<!DOCTYPE html>
<!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>用户注册页面模板</title>
@if(session('info'))
    <span id="info" class="text-red">{{session('info')}}</span>
@endif

<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<![endif]-->

<link href="{{ asset('/css/normalize.css') }}" rel="stylesheet"/>
<link href="{{ asset('/css/jquery-ui.css') }}" rel="stylesheet"/>
<link href="{{ asset('/css/jquery.idealforms.min.css') }}" rel="stylesheet" media="screen"/>

<style type="text/css">
body{font:normal 15px/1.5 Arial, Helvetica, Free Sans, sans-serif;color: #222;background:url(pattern.png);overflow-y:scroll;padding:60px 0 0 0;}
#my-form{width:755px;margin:0 auto;border:1px solid #ccc;padding:3em;border-radius:3px;box-shadow:0 0 2px rgba(0,0,0,.2);}
#comments{width:350px;height:100px;}
</style>

</head>
<body>


<div class="row">

  <div class="eightcol last">

    <!-- Begin Form -->

    <form id="my-form" action="{{ url('/Admin/register/insert') }}" method="post" enctype="multipart/form-data">
    {{ csrf_field() }}
        <section name="注册用户">

          <div><label>用户名:</label><input id="username" name="hd_name"   type="text"   placeholder="请您输入用户名" /></div>
          <div><label>密码:</label><input id="pass" name="hd_pass"  type="password" placeholder="请您输入密码"/></div>
          <div><label>确认密码:</label><input id="repass" name="hd_repass"  type="password"  placeholder="请您确认密码"/></div>
          <div><label>邮箱:</label><input id="email" name="hd_email"  type="email"  placeholder="请您输入邮箱"/></div>
             <div><label>性别:</label>
            <select  name="hd_sex" >
                <option value="1">&ndash; 选择性别 &ndash;</option>
                <option value="1" value="{{ old('hd_sex') }}">　　女　</option>
                <option value="2" value="{{ old('hd_sex') }}">　　男　</option>
            </select>
        </div>
          <div><label>电话:</label><input type="tel" name="hd_phone"  placeholder="请输入您的电话"/></div>
          <div><label>上传头像:</label><input id="file"  name="hd_pic" multiple type="file" /></div>
        </section>
      <div><hr/></div>
      <div>
        <button type="submit">提交</button>
        <button id="reset" type="button">重置</button>
      </div>
    </form>
    <!-- End Form -->
  </div>
</div>
<script type="text/javascript" src="{{ asset('/js/jquery-1.8.2.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/js/jquery-ui.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/js/jquery.idealforms.js') }}"></script>
<script type="text/javascript">
var options = {

	onFail: function(){
		alert( $myform.getInvalid().length +' invalid fields.' )
	},

	inputs: {
		'password': {
			filters: 'required pass',
		},
		'username': {
			filters: 'required username',
			data: {
			//ajax: { url:'validate.php' }
			}
		},
		'file': {
			filters: 'extension',
			data: { extension: ['jpg'] }
		},
		'comments': {
			filters: 'min max',
			data: { min: 50, max: 200 }
		},
		'states': {
			filters: 'exclude',
			data: { exclude: ['default'] },
			errors : {
				exclude: '选择国籍.'
			}
		},
		'langs[]': {
			filters: 'min max',
			data: { min: 2, max: 3 },
			errors: {
				min: 'Check at least <strong>2</strong> options.',
				max: 'No more than <strong>3</strong> options allowed.'
			}
		}
	}

};

var $myform = $('#my-form').idealforms(options).data('idealforms');

$('#reset').click(function(){
	$myform.reset().fresh().focusFirst()
});

$myform.focusFirst();
</script>
<div style="text-align:center;">
<p style = "color:#ccc;">请注册您的个人信息</p>
</div>
</body>
</html>